.PHONY:all
all:online_judge mysqluse

ctemplatepath=-I./ctemplate/ThirdPartLibForCpp/el7.x86_64/third_part/include  -L./ctemplate/ThirdPartLibForCpp/el7.x86_64/third_part/lib -lctemplate 
mysqlpath=-I/usr/include/mysql++ -I/usr/include/mysql/ -lmysqlpp
boostpath=-I/usr/include/boost -L/usr/lib64/ -lboost_filesystem -lboost_filesystem-mt -lboost_system
smtppath=-I./CSmtp-master -L./CSmtp/
FLAGS:=${CFLAG}
FLAGS+=$(mysqlpath) $(ctemplatepath) $(boostpath) -lpthread  -ljsoncpp  -std=c++11

exec=online_judge compiler_server mysqluse
##compiler_server为编译模块
compiler_server:compiler_server.cc 
	g++ -o $@ $< $(FLAGS) 

online_judge:online_judge.cc ./CSmtp-master/Smtp.cpp
	g++ -o $@ $^ $(FLAGS) 
##mysqluse为修改数据库题目描述模块
mysqluse:mysqluse.cc
	g++ -o $@ $< $(FLAGS) 
##
.PHONY:clean
clean:
	rm -rf *.o $(exec)

.PHONY:output
